ci-build: consistently use yes/no for booleans, not yes/empty
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 28 Nov 2016 12:34:06 +0000 (12:34 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 29 Nov 2016 14:11:50 +0000 (14:11 +0000)
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Closes: #600
Approved by: cgwalters

tests/ci-build.sh
tests/ci-install.sh

index 4aaa47af49a6cd66898c01755b559b3da7d88183..7b98820d318ec6e3923a30830ea11353af6b6e5b 100755 (executable)
@@ -50,7 +50,7 @@ ${make} install DESTDIR=$(pwd)/DESTDIR
 
 ( cd DESTDIR && find . )
 
-if [ -n "$ci_sudo" ] && [ -n "$ci_test" ]; then
+if [ "$ci_sudo" = yes ] && [ "$ci_test" = yes ]; then
     sudo ${make} install
     env \
         LD_LIBRARY_PATH=/usr/local/lib \
index 4aff39e997f5d996fafb8117d7d392486303f694..8111809f78f46a614ec80a6af263d209937151a2 100755 (executable)
@@ -5,7 +5,7 @@ set -x
 
 NULL=
 : "${ci_docker:=}"
-: "${ci_in_docker:=}"
+: "${ci_in_docker:=no}"
 : "${ci_suite:=jessie}"
 
 if [ $(id -u) = 0 ]; then
@@ -66,7 +66,7 @@ case "$ci_distro" in
             zlib1g-dev \
             ${NULL}
 
-        if [ -n "$ci_in_docker" ]; then
+        if [ "$ci_in_docker" = yes ]; then
             # Add the user that we will use to do the build inside the
             # Docker container, and let them use sudo
             adduser --disabled-password user </dev/null